<template>
  <div class="Lietous">
    <!--<div class="searchcontent">-->
      <!--<label for="search" class="label">猎头信息:</label>-->
      <!--<el-select id="search" class="select" v-model="searchID" filterable remote reserve-keyword clearable-->
        <!--placeholder="请输入猎头信息" :remote-method="remoteMethod" @change="handleChange" :loading="loading">-->
        <!--<el-option v-for="(item,index) in options" :key="index" :label="item.realname" :value="item.id">-->
        <!--</el-option>-->

      <!--</el-select>-->
    <!--</div>-->

      <result-form :searchResult="searchResult"></result-form>
  </div>
</template>
<script>
  import ResultForm from "./components/ResultForm";
  import Config from '@myconfig/config.min.js'
  export default {
    name: "Lietous",
    components: {
      ResultForm,
    },
    data() {
      return {
        options: [],
        searchID: "",
        loading: false,
        searchResult: {
          searchID: ''
        }
      };
    },
    methods: {
      handleChange(value) {
        this.searchResult.searchID = value;
        
      },
      remoteMethod(query) {
        if (query !== "") {
          this.loading = true;
          this.$http.get(Config.baseUrl + "/api/system/search/" + query).then(
            function (rsp) {
              if (rsp.data.code == 1) {
                this.options = rsp.data.data;
                this.loading = false;
              } else {
                this.options = [];
                this.loading = false;
              }
            },
            function (error) {
              this.options = [];
              this.loading = false;
            }
          );
        } else {
          this.options = [];
        }
      }
    }
  };
</script>

<style scoped>
.searchcontent{
  display: flex;
  padding: 20px 20px 0 20px;
  align-content: flex-start;
  align-items: center
}
.searchcontent .label{
  font-size: 16px;
  line-height: 16px;
  margin-right: 8px;
}
.searchcontent .select{
  flex: 1
}
</style>